#ifndef CMDJSON_H
#define CMDJSON_H

#include "cmd.h"
I32 cmd_get_upload_srctime(I8 *buf);
I32 cmd_gen_devinfo_string(DEV_INFO * info, I8 * buf);
I32 cmd_gen_gpsstatus_string(GPSINFO * gpsInfo, I8 * buf);
I32 cmd_handle_mng_heartbeat_string(I8 * buf);
I32 cmd_gen_mng_heartbeat_string(I8 * buf, I8 *devNum, I32 addDevNum, U32 buf_len, U32 state, I8 * msg);
I32 cmd_handle_mng_msg(I32 devType, I8 * buf, I32 length, I32 * conf, I32 * code, I32 *cmd_type);
I32 cmd_gen_mng_response(I8 * buf, U32 buf_len, U32 state, I8 * reason, I32 code, I32 type);
//I32 cmd_gen_data_upload(I8 *buf, U32 buf_len, I32 *data);
I32 cmd_gen_data_upload(UPDATA_CACHE * cache, PHONE_TMP * tmp, I32 tmp_off);
I32 cmd_gen_data_upload_end(UPDATA_CACHE * cache, I8 *devNum);
I32 cmd_handle_data_msg(I8 * buf, I32 length);
I32 cmd_handle_upload_result(I8 * buf);
I32 cmd_gen_warning(I32 code, I8 * buf, I8 * msg);
I32 cmd_handle_register_msg(I8 * buf, I32 length);
I32 cmd_check_msg_num(I8 *buf, I32 buf_len);
I32 cmd_gen_sys_info_string(SYS_INFO *sysInfo, I8 * buf);
I32 cmd_up_current_data(I8 *data, RECORDINFO *record);

I32 cmd_gen_devstatus_string(I32 devType ,DEV_STATUS * status, I8 * buf, DEV_CONF *conf);
I32 cmd_handle_upload_cfg_result(I8 *buf);
I32 cmd_gen_snf_result(I32 type, I8 * buf, I32 * data, I32 snfEnd);

I32 cmd_gen_bbu_info_string(DEV_CONF * devInfo, DEV_STATUS* status , I8 *buf);

I32 cmd_handle_statistics_intvl(I8 *buf, I32 *num);

I32 count_every_bbu_upload_num(I8 *buf, I32 upload_num, I32 cellNum, I32 serialNum);


I32 cmd_gen_sr_local_response(I32 type, I8 *buf, I8 *data, DEV_CONF *dev_conf);


I32 cmd_gen_local_config_response(I32 type, I8 *buf, DEV_CONF* dev_conf);

I32 cmd_gen_all_bbu_state(BBU_STATUS *bbu_status,I8 * buf, I32 *slotID);

I32 cmd_gen_eutran_version_string( SOFTWARE_VERSION_INFO* Info, I8 *buf);
I32	cmd_gen_gpsboardstatus_string(GPSBOARDINFO * gpsInfo, I8 * buf);

#endif
